package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.entity.QueryPageParam;
import com.itheima.pojo.Order;
import org.apache.ibatis.annotations.Param;
import com.itheima.pojo.OrderMemberSetmealVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderDao {

    public void add(Order order);

    public List<Order> findByCondition(Order order);

    public Map findById4Detail(Integer id);

    public Integer findOrderCountByDate(String date);

    public Integer findOrderCountAfterDate(String date);

    public Integer findVisitsCountByDate(String date);

    public Integer findVisitsCountAfterDate(String date);

    public List<Map> findHotSetmeal();

    List<Map> findByDate(@Param("telephone") String telephone , @Param("startDate")String startDate, @Param("endDate")String endDate);
    Map findById4OrderDetail(Integer id);

    Integer getOrderCountByDay(String day);

    Integer getVisitCountByDay(String day);

    //分页查询
    Page<OrderMemberSetmealVo> selectByCondition(QueryPageParam param);

    //根据预约项查询预约信息 及会员姓名
    OrderMemberSetmealVo findOrderAndMemberById(Integer orderId);

    //编辑预约项
    void edit(OrderMemberSetmealVo oms);

    //删除预约信息
    void deleteOrder(Integer orderId);

    //按钮修改预约状态
    void changeStatus(@Param("orderId") Integer orderId, @Param("orderStatus") String orderStatus);

    //根据id查询预约信息
    Order findById(Integer orderId);
}
